package cn.edu.sasu.mapper;

import cn.edu.sasu.domain.entity.SysRole;
import cn.edu.sasu.domain.entity.SysUser;
import cn.edu.sasu.domain.vo.SysRoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysRoleMapper {

    List<SysRoleVO> findSysRoleList(@Param("deleteFlagYes") Integer deleteFlagYes,@Param("offset") Integer offset,@Param("rows") Integer rows);

    Integer countSysRole(Integer deleteFlagYes);

    Integer updateSysRoleDeleteFlagByRoleId(@Param("roleId") Integer roleId,@Param("deleteFlagYes") Integer deleteFlagYes);

    Integer updateSysRoleDeleteFlagByRoleIds(@Param("asList") List<Integer> asList,@Param("deleteFlagYes") Integer deleteFlagYes);

    List<SysRoleVO> searchSysRoleList(@Param("deleteFlagYes") Integer deleteFlagYes,@Param("offset") Integer offset,@Param("rows") Integer rows,@Param("username") String username);

    Integer countSearchSysRole(@Param("deleteFlagYes") Integer deleteFlagYes,@Param("username") String username);


    SysRole findSysRoleByUsername(String username);

    Integer save(SysRole sysRole);

    Integer updateInfo(SysRoleVO roleVO);

    SysRole findSysRolerByRoleId(Integer roleId);
}
